/******************************************************************************
 * 
 * Announce: CSharpKit, Basic algorithms, components and definitions.
 *           Copyright (C) ShenYongchen.
 *           All rights reserved.
 *   Author: 申永辰.郑州 (shenyczz@163.com)
 *  WebSite: http://gitee.com/shenyczz/csharp_csk
 *
 * THIS CODE IS LICENSED UNDER THE MIT LICENSE (MIT).
 * THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF 
 * ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
 * IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
 * PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
 * 
******************************************************************************/

using System;
using System.Runtime.InteropServices;

namespace CSharpKit.Native.ECCODES
{
    partial class eccodes
    {


        /// <summary>
        /// 原型: int codes_values_check(codes_handle* h, codes_values* values, int count); <br/>
        /// 功能:  <br/>
        /// 状态:  <br/>
        /// </summary>
        /// <param name="codes_handle">codes_handle*</param>
        /// <param name="values">codes_values*</param>
        /// <param name="count">int</param>
        /// <returns></returns>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_values_check")]
        public extern static int codes_values_check(IntPtr codes_handle, IntPtr values, int count);

        /// <summary>
        /// <para>功能: Print all keys, with the context print procedure and dump mode to a resource. </para>
        /// <para>说明: </para>
        /// </summary>
        /// <param name="h">the handle to be printed </param>
        /// <param name="fout">output file handle </param>
        /// <param name="mode">Examples of available dump modes: debug wmo </param>
        /// <param name="option_flags">all the CODES_DUMP_FLAG_x flags can be used. </param>
        /// <param name="arg">used to provide a format to output data (experimental) </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: void codes_dump_content(const codes_handle* h, FILE* out, const char* mode, unsigned long option_flags, void* arg)
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_dump_content")]
        public static extern void codes_dump_content(IntPtr h, IntPtr fout, string mode, DumpOptions option_flags, IntPtr arg);

        /// <summary>
        /// <para>功能: Print all keys from the parsed definition files available in a context </para>
        /// <para>说明: </para>
        /// </summary>
        /// <param name="context">the context that contains the cached definition files to be printed </param>
        /// <param name="f"> the File used to print the keys on </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: void codes_dump_action_tree(codes_context* c, FILE* f);
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_dump_action_tree")]
        public static extern void codes_dump_action_tree(IntPtr context, IntPtr f);





        /// <summary>
        /// 原型: codes_box* codes_box_new(codes_handle* h, int* error) <br/>
        /// 功能:  <br/>
        /// 状态: Function not yet implemented <br/>
        /// </summary>
        /// <param name="handle"></param>
        /// <param name="err"></param>
        /// <returns></returns>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "grib_box_new")]
        public extern static IntPtr codes_box_new(IntPtr handle, ref int err);


        /// <summary>
        /// <para>功能: Get the API version </para>
        /// <para>说明: </para>
        /// </summary>
        /// <returns> API version </returns>
        /// <remarks>
        /// 原型: long codes_get_api_version(void);<br/>
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_get_api_version")]
        public static extern long codes_get_api_version();





        /// <summary>
        /// <para>功能: Set the GTS header mode on. </para>
        /// <para>说明: The GTS headers will be preserved. </para>
        /// </summary>
        /// <param name="context">the context </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: void codes_gts_header_on(codes_context* c)
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_gts_header_on")]
        public static extern void codes_gts_header_on(IntPtr context);

        /// <summary>
        /// <para>功能: Set the GTS header mode off. </para>
        /// <para>说明: The GTS headers will be deleted. </para>
        /// </summary>
        /// <param name="c">the context </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: void codes_gts_header_off(codes_context* c) <br/>
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_gts_header_off")]
        public static extern void codes_gts_header_off(IntPtr c);


        /// <summary>
        /// <para>功能: Set the GRIBEX mode on. </para>
        /// <para>说明: GRIB files will be compatible with GRIBEX. </para>
        /// </summary>
        /// <param name="context">the context </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: void codes_gribex_mode_on(codes_context* c)
        /// /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_gribex_mode_on")]
        public static extern void codes_gribex_mode_on(IntPtr context);

        /// <summary>
        /// <para>功能: Get the GRIBEX mode.</para>
        /// <para>说明: </para>
        /// </summary>
        /// <param name="context">the context </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: int codes_get_gribex_mode(codes_context* c)
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_get_gribex_mode")]
        public extern static int codes_get_gribex_mode(IntPtr context);


        /// <summary>
        /// <para>功能: Set the GRIBEX mode off.</para>
        /// <para>说明: GRIB files won't be always compatible with GRIBEX.</para>
        /// </summary>
        /// <param name="context">the context </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: void codes_gribex_mode_off(codes_context* c)
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_gribex_mode_off")]
        public extern static void codes_gribex_mode_off(IntPtr context);


        /// <summary>
        /// <para>功能: Prints the API version</para>
        /// <para>说明: </para>
        /// </summary>
        /// <param name="fout"> </param>
        /// <param name=""> </param>
        /// <param name=""> </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: void codes_print_api_version(FILE* out)
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_print_api_version")]
        public static extern void codes_print_api_version(IntPtr fout);


        /**
        *  Get the Git version control SHA1 identifier
        *
        *  @return character string with SHA1 identifier
*/
        /// <summary>
        /// <para>功能: </para>
        /// <para>说明: </para>
        /// </summary>
        /// <param name=""> </param>
        /// <param name=""> </param>
        /// <param name=""> </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: const char* codes_get_git_sha1(void)
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_get_git_sha1")]
        public static extern string codes_get_git_sha1();

        /**
        *  Get the package name
        *
        *  @return character string with package name
*/
        /// <summary>
        /// <para>功能: </para>
        /// <para>说明: </para>
        /// </summary>
        /// <param name=""> </param>
        /// <param name=""> </param>
        /// <param name=""> </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: const char* codes_get_package_name(void)
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_get_package_name")]
        public static extern string codes_get_package_name();




        /// <summary>
        /// <para>功能: </para>
        /// <para>说明: </para>
        /// </summary>
        /// <param name="call"> </param>
        /// <param name="file"> </param>
        /// <param name="line"> </param>
        /// <param name="e"> </param>
        /// <param name="msg"> </param>
        /// <returns> </returns>
        /// <remarks>
        /// 原型: void codes_check(const char* call, const char* file, int line, int e, const char* msg);
        /// </remarks>
        [DllImport(_dllname_, CharSet = CharSet.Auto, EntryPoint = "codes_check")]
        public static extern void codes_check(IntPtr call, string file, int line, int e, string msg);
        // void grib_check(const char* call, const char* file, int line, int e, const char* msg);
        // #define GRIB_CHECK(a, msg) grib_check(#a, __FILE__, __LINE__, a, msg)
        // #define GRIB_CHECK_NOLINE(a, msg) grib_check(#a, 0, 0, a, msg)




        // {{END}}
    }

}
